<template>
  <h1>{{ msg }}</h1>
  <button @click="getData">count is: {{ count }}</button>
  <p>info : {{ info }}</p>
  <p>
    Edit <code>components/HelloWorld.vue</code> to test hot module replacement.
  </p>
</template>

<script>
export default {
  name: "HelloWorld",
  props: {
    msg: String,
  },
  data() {
    return {
      count: 0,
      info: "none",
    };
  },
  methods: {
    getData: function () {
      this.count++;

      let api = "http://localhost:3000/";

      this.$axios.get(api).then(function (res) {
        console.log(res.data);
      });
    },
  },
};
</script>
